package com.sccba.emtbusiness.service.impl;

import java.util.List;

import com.sccba.common.utils.DateUtils;
import com.sccba.emtbusiness.domain.YjczEmergencyHandleProcess;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sccba.emtbusiness.mapper.YjczEmergencyProcessTemplateMapper;
import com.sccba.emtbusiness.domain.YjczEmergencyProcessTemplate;
import com.sccba.emtbusiness.service.IYjczEmergencyProcessTemplateService;

/**
 * 应急处置操作流程模板Service业务层处理
 * 
 * @author lichh
 * @date 2024-04-18
 */
@Service
public class YjczEmergencyProcessTemplateServiceImpl implements IYjczEmergencyProcessTemplateService 
{
    @Autowired
    private YjczEmergencyProcessTemplateMapper yjczEmergencyProcessTemplateMapper;

    /**
     * 查询应急处置操作流程模板
     * 
     * @param pkId 应急处置操作流程模板主键
     * @return 应急处置操作流程模板
     */
    @Override
    public YjczEmergencyProcessTemplate selectYjczEmergencyProcessTemplateByPkId(Long pkId)
    {
        return yjczEmergencyProcessTemplateMapper.selectYjczEmergencyProcessTemplateByPkId(pkId);
    }

    /**
     * 查询应急处置操作流程模板列表
     * 
     * @param yjczEmergencyProcessTemplate 应急处置操作流程模板
     * @return 应急处置操作流程模板
     */
    @Override
    public List<YjczEmergencyProcessTemplate> selectYjczEmergencyProcessTemplateList(YjczEmergencyProcessTemplate yjczEmergencyProcessTemplate)
    {
        return yjczEmergencyProcessTemplateMapper.selectYjczEmergencyProcessTemplateList(yjczEmergencyProcessTemplate);
    }

    /**
     * 新增应急处置操作流程模板
     * 
     * @param yjczEmergencyProcessTemplate 应急处置操作流程模板
     * @return 结果
     */
    @Override
    public int insertYjczEmergencyProcessTemplate(YjczEmergencyProcessTemplate yjczEmergencyProcessTemplate)
    {
        yjczEmergencyProcessTemplate.setCreateTime(DateUtils.getNowDate());
        return yjczEmergencyProcessTemplateMapper.insertYjczEmergencyProcessTemplate(yjczEmergencyProcessTemplate);
    }

    /**
     * 修改应急处置操作流程模板
     * 
     * @param yjczEmergencyProcessTemplate 应急处置操作流程模板
     * @return 结果
     */
    @Override
    public int updateYjczEmergencyProcessTemplate(YjczEmergencyProcessTemplate yjczEmergencyProcessTemplate)
    {
        yjczEmergencyProcessTemplate.setUpdateTime(DateUtils.getNowDate());
        return yjczEmergencyProcessTemplateMapper.updateYjczEmergencyProcessTemplate(yjczEmergencyProcessTemplate);
    }

    /**
     * 批量删除应急处置操作流程模板
     * 
     * @param pkIds 需要删除的应急处置操作流程模板主键
     * @return 结果
     */
    @Override
    public int deleteYjczEmergencyProcessTemplateByPkIds(Long[] pkIds)
    {
        return yjczEmergencyProcessTemplateMapper.deleteYjczEmergencyProcessTemplateByPkIds(pkIds);
    }

    /**
     * 删除应急处置操作流程模板信息
     * 
     * @param pkId 应急处置操作流程模板主键
     * @return 结果
     */
    @Override
    public int deleteYjczEmergencyProcessTemplateByPkId(Long pkId)
    {
        return yjczEmergencyProcessTemplateMapper.deleteYjczEmergencyProcessTemplateByPkId(pkId);
    }

    @Override
    public void deleteTemplateBySceneId(Long sceneId) {
        yjczEmergencyProcessTemplateMapper.deleteTemplateBySceneId(sceneId);
    }

    @Override
    public void batchInsert(List<YjczEmergencyProcessTemplate> list) {
        yjczEmergencyProcessTemplateMapper.batchInsert(list);
    }

    @Override
    public void deleteByPkIds(List<Long> list) {
        yjczEmergencyProcessTemplateMapper.deleteByPkIds(list);
    }

    @Override
    public void batchUpdate(List<YjczEmergencyProcessTemplate> list) {
        yjczEmergencyProcessTemplateMapper.batchUpdate(list);
    }

    @Override
    public List<YjczEmergencyProcessTemplate> selectTemplateListBySceneId(String sceneId) {
        return yjczEmergencyProcessTemplateMapper.selectTemplateListBySceneId(sceneId);
    }

}
